package com.duoec.magichour.mapper;

import com.duoec.magichour.core.BaseMapper;
import com.duoec.magichour.pojo.Authorize;
import org.apache.ibatis.annotations.Param;

public interface AuthorizeMapper extends BaseMapper<Authorize, String> {
    void deleteByPrimaryKey(@Param("id") String id);

    /**
     * 通过token，获取用户session
     * @param authToken token
     * @return
     */
    Authorize getByToken(String authToken);

    Authorize getByLoginType(@Param("userId") long userId, @Param("authFrom") byte loginType);
}